-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make zenoh router configurable using envar #119
Conversation
Signed-off-by: Yadunund <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't do a full review here, but I did want to discuss this point:
The router executable is now zenohd to align with that of upstream Zenoh.
I'm not so sure that is a great idea. The fact is that while this is similar to the upstream zenohd
, it is not exactly the same and doesn't support all of the same things (in particular, plugins). So I do think we should make it clear that this is the rmw_zenoh_cpp
version of this. I know that ros2 run rmw_zenoh_cpp zenohd
does that, but:
- You don't have to run it that way; you can also do /path/to/zenohd, and then it looks just like the upstream one.
- In the process listing, it will show up as
zenohd
. Yes, the full executable path will be to an rmw_zenoh-specific path, but it is an easy detail to overlook.
My suggestion is that we do indeed rename it, but to something else. Something like rmw_zenohd
or something like?
Signed-off-by: Yadunund <[email protected]>
That makes a lot of sense to me. I've renamed the executable to |
Signed-off-by: Yadunund <[email protected]>
Signed-off-by: Yadunund <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've left a few pretty minor things to change. Otherwise, this looks good to me.
///============================================================================== | ||
/// Map the configurable entity to a pair of environment variable name that | ||
/// stores the absolute path to the Zenoh config and the default config filename. | ||
/// Note: The default config file should be located within rmw_zenoh_cpp/config/. | ||
static const std::unordered_map<ConfigurableEntity, | ||
std::pair<const char *, const char *>> envar_map = { | ||
{ConfigurableEntity::Session, | ||
{"ZENOH_SESSION_CONFIG_URI", "DEFAULT_RMW_ZENOH_SESSION_CONFIG.json5"}}, | ||
{ConfigurableEntity::Router, {"ZENOH_ROUTER_CONFIG_URI", "DEFAULT_RMW_ZENOH_ROUTER_CONFIG.json5"}} | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this map can be put into zenoh_config.cpp
. That will have the big benefit of it not being included with every compilation unit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Co-authored-by: Chris Lalancette <[email protected]> Signed-off-by: Yadu <[email protected]>
Co-authored-by: Chris Lalancette <[email protected]> Signed-off-by: Yadu <[email protected]>
Co-authored-by: Chris Lalancette <[email protected]> Signed-off-by: Yadu <[email protected]>
Signed-off-by: Yadunund <[email protected]>
Signed-off-by: Yadunund <[email protected]>
This PR
router
configuration file via theZENOH_ROUTER_CONFIG_URI
envar.session
config file is nowZENOH_SESSION_CONFIG_URI
router
executable is nowzenohd
to align with that of upstream Zenoh.Addresses #102